3.79 \(\int \frac{\csc ^6(e+f x)}{(a+b \tan ^2(e+f x))^2} \, dx\)

Optimal. Leaf size=182 \[ -\frac{b \left (5 a^2-10 a b+7 b^2\right ) \tan (e+f x)}{10 a^4 f \left (a+b \tan ^2(e+f x)\right )}-\frac{\left (5 a^2-20 a b+14 b^2\right ) \cot (e+f x)}{5 a^4 f}-\frac{\sqrt{b} (3 a-7 b) (a-b) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a}}\right )}{2 a^{9/2} f}-\frac{(10 a-7 b) \cot ^3(e+f x)}{15 a^3 f}-\frac{\cot ^5(e+f x)}{5 a f \left (a+b \tan ^2(e+f x)\right )} \]

[Out]

-((3*a - 7*b)*(a - b)*Sqrt[b]*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/(2*a^(9/2)*f) - ((5*a^2 - 20*a*b + 14*b^
2)*Cot[e + f*x])/(5*a^4*f) - ((10*a - 7*b)*Cot[e + f*x]^3)/(15*a^3*f) - Cot[e + f*x]^5/(5*a*f*(a + b*Tan[e + f
*x]^2)) - (b*(5*a^2 - 10*a*b + 7*b^2)*Tan[e + f*x])/(10*a^4*f*(a + b*Tan[e + f*x]^2))

________________________________________________________________________________________

Rubi [A]  time = 0.223147, antiderivative size = 182, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.217, Rules used = {3663, 462, 456, 1261, 205} \[ -\frac{b \left (5 a^2-10 a b+7 b^2\right ) \tan (e+f x)}{10 a^4 f \left (a+b \tan ^2(e+f x)\right )}-\frac{\left (5 a^2-20 a b+14 b^2\right ) \cot (e+f x)}{5 a^4 f}-\frac{\sqrt{b} (3 a-7 b) (a-b) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a}}\right )}{2 a^{9/2} f}-\frac{(10 a-7 b) \cot ^3(e+f x)}{15 a^3 f}-\frac{\cot ^5(e+f x)}{5 a f \left (a+b \tan ^2(e+f x)\right )} \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^6/(a + b*Tan[e + f*x]^2)^2,x]

[Out]

-((3*a - 7*b)*(a - b)*Sqrt[b]*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/(2*a^(9/2)*f) - ((5*a^2 - 20*a*b + 14*b^
2)*Cot[e + f*x])/(5*a^4*f) - ((10*a - 7*b)*Cot[e + f*x]^3)/(15*a^3*f) - Cot[e + f*x]^5/(5*a*f*(a + b*Tan[e + f
*x]^2)) - (b*(5*a^2 - 10*a*b + 7*b^2)*Tan[e + f*x])/(10*a^4*f*(a + b*Tan[e + f*x]^2))

Rule 3663

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(c*ff^(m + 1))/f, Subst[Int[(x^m*(a + b*(ff*x)^n)^p)/(c^2 + ff^2*x^2
)^(m/2 + 1), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/2]

Rule 462

Int[((e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^2, x_Symbol] :> Simp[(c^2*(e*x)^(
m + 1)*(a + b*x^n)^(p + 1))/(a*e*(m + 1)), x] - Dist[1/(a*e^n*(m + 1)), Int[(e*x)^(m + n)*(a + b*x^n)^p*Simp[b
*c^2*n*(p + 1) + c*(b*c - 2*a*d)*(m + 1) - a*(m + 1)*d^2*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, p}, x] && Ne
Q[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[m, -1] && GtQ[n, 0]

Rule 456

Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[((-a)^(m/2 - 1)*(b*c - a*d)*
x*(a + b*x^2)^(p + 1))/(2*b^(m/2 + 1)*(p + 1)), x] + Dist[1/(2*b^(m/2 + 1)*(p + 1)), Int[x^m*(a + b*x^2)^(p +
1)*ExpandToSum[2*b*(p + 1)*Together[(b^(m/2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d)*x^(-m + 2))/(a + b*x^2)]
 - ((-a)^(m/2 - 1)*(b*c - a*d))/x^m, x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &
& ILtQ[m/2, 0] && (IntegerQ[p] || EqQ[m + 2*p + 1, 0])

Rule 1261

Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> In
t[ExpandIntegrand[(f*x)^m*(d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, q}, x] &&
 NeQ[b^2 - 4*a*c, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\csc ^6(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (1+x^2\right )^2}{x^6 \left (a+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{\cot ^5(e+f x)}{5 a f \left (a+b \tan ^2(e+f x)\right )}+\frac{\operatorname{Subst}\left (\int \frac{10 a-7 b+5 a x^2}{x^4 \left (a+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{5 a f}\\ &=-\frac{\cot ^5(e+f x)}{5 a f \left (a+b \tan ^2(e+f x)\right )}-\frac{b \left (5 a^2-10 a b+7 b^2\right ) \tan (e+f x)}{10 a^4 f \left (a+b \tan ^2(e+f x)\right )}-\frac{b \operatorname{Subst}\left (\int \frac{2 \left (\frac{7}{a}-\frac{10}{b}\right )+2 \left (\frac{10}{a}-\frac{5}{b}-\frac{7 b}{a^2}\right ) x^2+\frac{\left (5 a^2-10 a b+7 b^2\right ) x^4}{a^3}}{x^4 \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{10 a f}\\ &=-\frac{\cot ^5(e+f x)}{5 a f \left (a+b \tan ^2(e+f x)\right )}-\frac{b \left (5 a^2-10 a b+7 b^2\right ) \tan (e+f x)}{10 a^4 f \left (a+b \tan ^2(e+f x)\right )}-\frac{b \operatorname{Subst}\left (\int \left (-\frac{2 (10 a-7 b)}{a^2 b x^4}-\frac{2 \left (5 a^2-20 a b+14 b^2\right )}{a^3 b x^2}+\frac{5 (3 a-7 b) (a-b)}{a^3 \left (a+b x^2\right )}\right ) \, dx,x,\tan (e+f x)\right )}{10 a f}\\ &=-\frac{\left (5 a^2-20 a b+14 b^2\right ) \cot (e+f x)}{5 a^4 f}-\frac{(10 a-7 b) \cot ^3(e+f x)}{15 a^3 f}-\frac{\cot ^5(e+f x)}{5 a f \left (a+b \tan ^2(e+f x)\right )}-\frac{b \left (5 a^2-10 a b+7 b^2\right ) \tan (e+f x)}{10 a^4 f \left (a+b \tan ^2(e+f x)\right )}-\frac{((3 a-7 b) (a-b) b) \operatorname{Subst}\left (\int \frac{1}{a+b x^2} \, dx,x,\tan (e+f x)\right )}{2 a^4 f}\\ &=-\frac{(3 a-7 b) (a-b) \sqrt{b} \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a}}\right )}{2 a^{9/2} f}-\frac{\left (5 a^2-20 a b+14 b^2\right ) \cot (e+f x)}{5 a^4 f}-\frac{(10 a-7 b) \cot ^3(e+f x)}{15 a^3 f}-\frac{\cot ^5(e+f x)}{5 a f \left (a+b \tan ^2(e+f x)\right )}-\frac{b \left (5 a^2-10 a b+7 b^2\right ) \tan (e+f x)}{10 a^4 f \left (a+b \tan ^2(e+f x)\right )}\\ \end{align*}

Mathematica [A]  time = 1.61669, size = 151, normalized size = 0.83 \[ \frac{\sqrt{a} \left (-2 \cot (e+f x) \left (3 a^2 \csc ^4(e+f x)+8 a^2+2 a (2 a-5 b) \csc ^2(e+f x)-50 a b+45 b^2\right )-\frac{15 b (a-b)^2 \sin (2 (e+f x))}{(a-b) \cos (2 (e+f x))+a+b}\right )-15 \sqrt{b} \left (3 a^2-10 a b+7 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a}}\right )}{30 a^{9/2} f} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^6/(a + b*Tan[e + f*x]^2)^2,x]

[Out]

(-15*Sqrt[b]*(3*a^2 - 10*a*b + 7*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]] + Sqrt[a]*(-2*Cot[e + f*x]*(8*a^2
 - 50*a*b + 45*b^2 + 2*a*(2*a - 5*b)*Csc[e + f*x]^2 + 3*a^2*Csc[e + f*x]^4) - (15*(a - b)^2*b*Sin[2*(e + f*x)]
)/(a + b + (a - b)*Cos[2*(e + f*x)])))/(30*a^(9/2)*f)

________________________________________________________________________________________

Maple [A]  time = 0.102, size = 281, normalized size = 1.5 \begin{align*} -{\frac{1}{5\,f{a}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{5}}}-{\frac{2}{3\,f{a}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}}+{\frac{2\,b}{3\,f{a}^{3} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}}-{\frac{1}{f{a}^{2}\tan \left ( fx+e \right ) }}+4\,{\frac{b}{f{a}^{3}\tan \left ( fx+e \right ) }}-3\,{\frac{{b}^{2}}{f{a}^{4}\tan \left ( fx+e \right ) }}-{\frac{b\tan \left ( fx+e \right ) }{2\,f{a}^{2} \left ( a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }}+{\frac{{b}^{2}\tan \left ( fx+e \right ) }{f{a}^{3} \left ( a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }}-{\frac{{b}^{3}\tan \left ( fx+e \right ) }{2\,f{a}^{4} \left ( a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }}-{\frac{3\,b}{2\,f{a}^{2}}\arctan \left ({b\tan \left ( fx+e \right ){\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+5\,{\frac{{b}^{2}}{f{a}^{3}\sqrt{ab}}\arctan \left ({\frac{b\tan \left ( fx+e \right ) }{\sqrt{ab}}} \right ) }-{\frac{7\,{b}^{3}}{2\,f{a}^{4}}\arctan \left ({b\tan \left ( fx+e \right ){\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^6/(a+b*tan(f*x+e)^2)^2,x)

[Out]

-1/5/f/a^2/tan(f*x+e)^5-2/3/f/a^2/tan(f*x+e)^3+2/3/f/a^3/tan(f*x+e)^3*b-1/f/a^2/tan(f*x+e)+4/f/a^3/tan(f*x+e)*
b-3/f/a^4/tan(f*x+e)*b^2-1/2/f/a^2*b*tan(f*x+e)/(a+b*tan(f*x+e)^2)+1/f/a^3*b^2*tan(f*x+e)/(a+b*tan(f*x+e)^2)-1
/2/f*b^3/a^4*tan(f*x+e)/(a+b*tan(f*x+e)^2)-3/2/f/a^2*b/(a*b)^(1/2)*arctan(b*tan(f*x+e)/(a*b)^(1/2))+5/f/a^3*b^
2/(a*b)^(1/2)*arctan(b*tan(f*x+e)/(a*b)^(1/2))-7/2/f*b^3/a^4/(a*b)^(1/2)*arctan(b*tan(f*x+e)/(a*b)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^6/(a+b*tan(f*x+e)^2)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.23507, size = 2028, normalized size = 11.14 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^6/(a+b*tan(f*x+e)^2)^2,x, algorithm="fricas")

[Out]

[-1/120*(4*(16*a^3 - 131*a^2*b + 220*a*b^2 - 105*b^3)*cos(f*x + e)^7 - 4*(40*a^3 - 321*a^2*b + 590*a*b^2 - 315
*b^3)*cos(f*x + e)^5 + 20*(6*a^3 - 47*a^2*b + 104*a*b^2 - 63*b^3)*cos(f*x + e)^3 - 15*((3*a^3 - 13*a^2*b + 17*
a*b^2 - 7*b^3)*cos(f*x + e)^6 - (6*a^3 - 29*a^2*b + 44*a*b^2 - 21*b^3)*cos(f*x + e)^4 + 3*a^2*b - 10*a*b^2 + 7
*b^3 + (3*a^3 - 19*a^2*b + 37*a*b^2 - 21*b^3)*cos(f*x + e)^2)*sqrt(-b/a)*log(((a^2 + 6*a*b + b^2)*cos(f*x + e)
^4 - 2*(3*a*b + b^2)*cos(f*x + e)^2 + 4*((a^2 + a*b)*cos(f*x + e)^3 - a*b*cos(f*x + e))*sqrt(-b/a)*sin(f*x + e
) + b^2)/((a^2 - 2*a*b + b^2)*cos(f*x + e)^4 + 2*(a*b - b^2)*cos(f*x + e)^2 + b^2))*sin(f*x + e) + 60*(3*a^2*b
 - 10*a*b^2 + 7*b^3)*cos(f*x + e))/(((a^5 - a^4*b)*f*cos(f*x + e)^6 + a^4*b*f - (2*a^5 - 3*a^4*b)*f*cos(f*x +
e)^4 + (a^5 - 3*a^4*b)*f*cos(f*x + e)^2)*sin(f*x + e)), -1/60*(2*(16*a^3 - 131*a^2*b + 220*a*b^2 - 105*b^3)*co
s(f*x + e)^7 - 2*(40*a^3 - 321*a^2*b + 590*a*b^2 - 315*b^3)*cos(f*x + e)^5 + 10*(6*a^3 - 47*a^2*b + 104*a*b^2
- 63*b^3)*cos(f*x + e)^3 - 15*((3*a^3 - 13*a^2*b + 17*a*b^2 - 7*b^3)*cos(f*x + e)^6 - (6*a^3 - 29*a^2*b + 44*a
*b^2 - 21*b^3)*cos(f*x + e)^4 + 3*a^2*b - 10*a*b^2 + 7*b^3 + (3*a^3 - 19*a^2*b + 37*a*b^2 - 21*b^3)*cos(f*x +
e)^2)*sqrt(b/a)*arctan(1/2*((a + b)*cos(f*x + e)^2 - b)*sqrt(b/a)/(b*cos(f*x + e)*sin(f*x + e)))*sin(f*x + e)
+ 30*(3*a^2*b - 10*a*b^2 + 7*b^3)*cos(f*x + e))/(((a^5 - a^4*b)*f*cos(f*x + e)^6 + a^4*b*f - (2*a^5 - 3*a^4*b)
*f*cos(f*x + e)^4 + (a^5 - 3*a^4*b)*f*cos(f*x + e)^2)*sin(f*x + e))]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**6/(a+b*tan(f*x+e)**2)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.39182, size = 286, normalized size = 1.57 \begin{align*} -\frac{\frac{15 \,{\left (3 \, a^{2} b - 10 \, a b^{2} + 7 \, b^{3}\right )}{\left (\pi \left \lfloor \frac{f x + e}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (b\right ) + \arctan \left (\frac{b \tan \left (f x + e\right )}{\sqrt{a b}}\right )\right )}}{\sqrt{a b} a^{4}} + \frac{15 \,{\left (a^{2} b \tan \left (f x + e\right ) - 2 \, a b^{2} \tan \left (f x + e\right ) + b^{3} \tan \left (f x + e\right )\right )}}{{\left (b \tan \left (f x + e\right )^{2} + a\right )} a^{4}} + \frac{2 \,{\left (15 \, a^{2} \tan \left (f x + e\right )^{4} - 60 \, a b \tan \left (f x + e\right )^{4} + 45 \, b^{2} \tan \left (f x + e\right )^{4} + 10 \, a^{2} \tan \left (f x + e\right )^{2} - 10 \, a b \tan \left (f x + e\right )^{2} + 3 \, a^{2}\right )}}{a^{4} \tan \left (f x + e\right )^{5}}}{30 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^6/(a+b*tan(f*x+e)^2)^2,x, algorithm="giac")

[Out]

-1/30*(15*(3*a^2*b - 10*a*b^2 + 7*b^3)*(pi*floor((f*x + e)/pi + 1/2)*sgn(b) + arctan(b*tan(f*x + e)/sqrt(a*b))
)/(sqrt(a*b)*a^4) + 15*(a^2*b*tan(f*x + e) - 2*a*b^2*tan(f*x + e) + b^3*tan(f*x + e))/((b*tan(f*x + e)^2 + a)*
a^4) + 2*(15*a^2*tan(f*x + e)^4 - 60*a*b*tan(f*x + e)^4 + 45*b^2*tan(f*x + e)^4 + 10*a^2*tan(f*x + e)^2 - 10*a
*b*tan(f*x + e)^2 + 3*a^2)/(a^4*tan(f*x + e)^5))/f